<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class Upload extends AppModel {
    
    public $validate = array(
//        'name' => array(
//            'rule' => 'notEmpty'
//        ),
        'filename' => array(
            'rule' => 'notEmpty'
        )
    );
    
    public function isOwnedBy($st, $user) {
        return $this->field('id', array('id' => $st, 'creator_id' => $user)) === $st;
    }
}
?>